@extends('admin.common.base-master')

@section('html-head')
    <link href="{{url('css/admin/pagenum.css')}}" rel="stylesheet" />
@endsection

@section('html-body')
    <!-- content start -->
    <div id="content">
        <!-- cur-position start -->
        <div id="cur-position">
            <span class="tit">当前位置：</span>
            <a href="#">积分管理</a>
            <em> > </em>
            <a href="#">积分列表</a>
        </div>
        <!-- cur-position end -->

        @include('admin.common.integral-header')

        <div class="table-box">
            <table class="table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>用户昵称</th>
                    <th>用户头像</th>
                    <th>订单编号</th>
                    <th>商品名称</th>
                    <th>商品缩略图</th>
                    <th>商品数量</th>
                    <th>积分</th>
                    <th>类型</th>
                    <th>创建时间</th>
                </tr>
                </thead>
                <tbody id="fansinfo">
                @if(count($userIntegral) > 0)
                    @foreach($userIntegral as $user)
                        <tr>
                            <td>{{$user->id}}</td>
                            <td>{{$user->nickname}}</td>
                            <td class="account-td" style="width: 20px;">
                        <span class="photo">
                            <img src="{{$user->photo_url}}" alt="" width="50">
                        </span>
                            </td>
                            <td>{{$user->order_num}}</td>
                            <td>{{$user->goods_name}}</td>
                            <td><img src="{{$user->thumb_url}}" alt="" width="50"></td>
                            <td>{{$user->num}}</td>
                            <td>{{$user->integral}}</td>
                            <td>
                                @if($user->type == 'common')
                                    购买商品所获
                                @else
                                    购买商品消费
                                @endif
                            </td>
                            <td>{{$user->created_at}}</td>
                            {{--<td><a class="btnLump btnLump1" href="">删除｜锁定</a></td>--}}
                        </tr>
                    @endforeach
                @endif
                </tbody>
            </table>
            <?php echo $userIntegral->render(); ?>
        </div>
    </div>
    <!-- content end -->

@endsection